<script type="text/javascript" >
    sttheme.load_tooltip();
    sttheme.on_submitform('#settingForm', function(){
        sttheme.loadPage('home', '', '<?php _e("Successful", $config['plugin_name']) ?>');
    });
    sttheme.loadUploadButton();
    sttheme.loadRemoveButton();
</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
        <form class="stform" id="settingForm" action="<?php echo admin_url('/admin.php?page=' . $config['theme_name'] . '&action=' . $current_action) ?>" method="post" >
            <br clear="both" />
            <ul>


                <li>
                    <label><?php _e('URL', $config['theme_name']) ?>:</label>
                    <div>
                        <input value="<?php echo $option['photo_url'] ?>" class="" name="data[photo_url]"  type="text"/>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Photo', $config['sttheme']); ?>:</label>
                    <div class="required">
                        <?php 
                        $class_hide = "hide";
                        if (!empty($option['image'])) {
                            $stplugin_picture_url = $option['image'];
                            $class_hide = "";
                        }
                        ?>
                        <input value="<?php echo $stplugin_picture_url ?>"  name="data[image]" id="id_stplugin_picture" type="hidden"/>
                        <div class="upload_button_div">
                            <span id="stplugin_picture" class="button image_upload_button">Upload photo</span>
                            <span pictureID="stplugin_picture" id="reset_stplugin_picture" class="button image_reset_button <?php echo $class_hide ?>">Remove</span>
                        </div>
                        <?php
                        if (!empty($option['image'])) {
                            ?>
                            <img alt="" src="<?php echo $stplugin_picture_url ?>" id="image_stplugin_picture" class="hide preview" style="display: inline;"/>
                        <?php } ?>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Home Middle page', $config['plugin_name']) ?>:</label>
                    <div>
                        <select name="data[home_middle_page]"  class="widefat">
                            <?php
                            $page_ids = get_all_page_ids();
                            foreach ($page_ids as $pageid) {
                                $page = get_page($pageid);
                                ?>
                                <option value="<?php echo $page->ID ?>" <?php echo $option['home_middle_page'] == $page->ID ? 'selected' : '' ?>><?php echo $page->post_title; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Home right page', $config['plugin_name']) ?>:</label>
                    <div>
                        <select name="data[home_right_page]"  class="widefat">
                            <?php
                            $page_ids = get_all_page_ids();
                            foreach ($page_ids as $pageid) {
                                $page = get_page($pageid);
                                ?>
                                <option value="<?php echo $page->ID ?>" <?php echo $option['home_right_page'] == $page->ID ? 'selected' : '' ?>><?php echo $page->post_title; ?></option>
                            <?php } ?>
                        </select>
                    </div>
                    <br clear="both" />
                </li>

                <li>
                    <input type="submit" value="Submit"/>
                </li>


            </ul>
        </form>
    </div>
</div>